package net.pm.core.service.pmuser;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.pm.common.service.GenericServicer;
import net.pm.core.entities.db.Loginlog;

public interface LoginLogServicer extends GenericServicer<Loginlog, String>{
	
	/**
	 * 查看登录日志记录
	 * @param deptId
	 * @return
	 */
	List<Loginlog> findLoginlogs(Date startdate, Date enddate,Integer deptId,Long userId,Short logResultKey);
	
	/**
	 * 登录结果,组别
	 */
	Map<Short, Short[]> logResultMap = new HashMap<Short, Short[]>() {
		private static final long serialVersionUID = 7686521493714345079L;
		{
			put(Loginlog.LOGRESULT_DEFAULT_DISPLAY, new Short[] {
					Loginlog.logResult_account_disable,
					Loginlog.logResult_passwd_error});
			put(Loginlog.logResult_account_disable, null);
			put(Loginlog.logResult_passwd_error, null);
			put(Loginlog.logResult_login_success, null);
			put(Loginlog.LOGRESULT_ALL_DISPLAY, new Short[] {
					Loginlog.logResult_account_disable,
					Loginlog.logResult_passwd_error,
					Loginlog.logResult_login_success});
		}
	};
}
